<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86153
  Date: 2023/3/19
  Time: 14:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>


<html>
<head>
	<base href="<%=basePath%>">
	<link href="css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print"/>
	<link href="css/print.css" rel="stylesheet" type="text/css" media="print"/>
	<script src="js/jquery-1.10.1.min.js"></script>
	<script src="js/side.js" type="text/javascript"></script>
	<script src="js/jquery-3.6.0.js"></script>
	<script>
        function Delete_Enterprise(comAccount) {
            var comAccount1 = comAccount;
            $.ajax({
                url: 'admin_info/Delete_Enterprise',
                type: 'POST',
                data: {
                    comId: comAccount1
                },
                success: function (data) {
                    if (data.code == '0111') {
                        console.log(data.message);
                        alert("删除成功");
                        window.location.reload();
                    } else if (data.code == '0110') {
                        console.log(data.message);
                        alert("删除失败");
                    }
                }
            })
        }
	</script>
	<style>
        .tr1 {
            position: absolute;
            top: 100px;
        }

        .tdColor {
            width: 203px;
            height: 40px;
            background-color: #f2f2f2;
            color: #438eb9;
        }
	</style>
</head>
<body>
<div id="MainForm">
	<div class="form_boxA">
		<div class="page">
			<img src="img/coin02.png"/><span><a href="<c:url value="/jsp/admin_view.jsp"/>">&nbsp;&nbsp首页</a>&nbsp;-&nbsp;-</span>&nbsp;企业用户信息
		</div>
		<h2>企业用户列表</h2>
		<table class="tr1">
			<tr>
				<td class="tdColor">企业编号</td>
				<td class="tdColor">企业名称</td>
				<td class="tdColor">企业地点</td>
				<td class="tdColor">招聘要求</td>
				<td class="tdColor">招聘地点</td>
				<td class="tdColor">薪资范围</td>
				<td class="tdColor">公司账号</td>
				<td class="tdColor">操作</td>
			</tr>
			<c:forEach items="${enterpriseInfos}" var="s">
				<tr>
					<td>${s.comId}</td>
					<td>${s.comName}</td>
					<td>${s.comLocal}</td>
					<td>${s.recruitmentRequirements}</td>
					<td>${s.recruitmentPositions}</td>
					<td>${s.salaryRange}</td>
					<td>${s.comAccount}</td>
					<td>
						<button onclick="Delete_Enterprise(${s.comId})"><img class="operation delban"
						                                                     src="img/delete.png"></button>
						<button><a
								href="jsp/update_enterprise.jsp?comId=${s.comId}&comName=${s.comName}&comLocal=${s.comLocal}&recruitmentRequirements=${s.recruitmentRequirements}
&recruitmentPositions=${s.recruitmentPositions}&salaryRange=${s.salaryRange}&vocationalInfo=${s.vocationalInfo}&enStatus=${s.enStatus}&comAccount=${s.comAccount}"><img
								class="operation" src="img/update.png"></a></button>
					</td>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>
</div>

</body>
</html>
